
import Share from '../pages/share/index'
import Shares from '../pages/topic/index'
import Home from '../pages/home/index'
import Login from '../pages/auth/login'

import Artical from "./modules/Artical"
import FileUpload from './modules/FileUpload';
const RouterList: any[] = [
  {
    component: Login,
    title: "Login",
    meta: {
      showHeade: false
    },
    path: '/login',
    icon: null
  },
  {
    component: Home,
    title: "首页",
    meta: {
      showHeade: true
    },
    path: '/home',
    icon: "BankOutlined"
  },
  {
    component: Share,
    title: "分享",
    icon: "ShareAltOutlined",
    meta: {
      showHeade: true
    },
    path: '/share'
  },
  {
    component: Shares,
    title: "专题",
    meta: {
      showHeade: true
    },
    path: '/topic',
    icon: "BookOutlined"
  },
  ...Artical,
  ...FileUpload
]
// const RouterMap = () => {
//   return (
//     <>
//       {/* {RouterList.map(item => {
//         return <Switch><Route
//           key={item.path}
//           exact={true}
//           path={item.path}
//           component={item.component}
//         >{item.path}</Route></Switch>
//       })} */}
//       <Router>
//         {/* <Switch> */}
//           {RouterList.map(item => 
//             // <>{item.path}</>
//             <Route
//               key={item.path}
//               exact={true}
//               path={item.path}
//               component={item.component}
//             >
//               {item.path}
//             </Route>
//           )}
//         {/* </Switch> */}
//       </Router>
//     </>
//   )
// }

export {RouterList}
